package com.example.administrator.hualangrecyclerview;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;


import com.example.administrator.hualangrecyclerview.shop.ShopActivity;


public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private static final Uri URL_TAYA_BEHANCE = Uri.parse("https://www.behance.net/yurkivt");
    private static final Uri URL_SHOP_PHOTOS = Uri.parse("https://herriottgrace.com/collections/all");
    private static final Uri URL_CITY_ICONS = Uri.parse("https://www.flaticon.com");
    private static final Uri URL_APP_REPO = Uri.parse("https://github.com/yarolegovich/DiscreteScrollView");

    private View root;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        findViewById(R.id.preview_shop).setOnClickListener(this);
        findViewById(R.id.drawable).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.preview_shop:
                start(ShopActivity.class);
                break;
            case R.id.drawable:
                start(DrawableActivity.class);
                break;
        }
    }

    private void start(Class<? extends Activity> token) {
        Intent intent = new Intent(this, token);
        startActivity(intent);
    }
}
